<?php
//error_reporting(0);

/**
 * 话题推荐管理 
 * 
 * @copyright caijian
 * @since 2012-03-21
 */

include_once($_SERVER["DOCUMENT_ROOT"] . "/core/inc.php");
include_once($_SERVER["DOCUMENT_ROOT"] . "/core/admin.inc.php");
include_once($_SERVER["DOCUMENT_ROOT"] . "/include/foodv2/inc.php");
include_once($_SERVER["DOCUMENT_ROOT"] . "/token/config.php");

$g_cgival = array();
$g_pro = array();
$g_show = array();

function show_pro()
{
	/*global $g_show;
	$smarty = p_get_smarty ();
	$smarty->assign( $g_show );

	if (! empty($g_show['error']) ) {
		print $g_show['errmsg'];
		exit;
	} else {
		$smarty->display("foodv2/topic/topic_tuijian.html" );
	}
	*/
}


function check_cgi_pro()
{
	global $g_cgival, $g_pro, $g_show;
	cgi::both($g_cgival["status_id"], "status_id", 0);
	
	$g_cgival["status_id"] = intval($g_cgival["status_id"]);
	
}


function get_data()
{
	global $g_cgival, $g_pro, $g_show;
	

	if(!$g_cgival["status_id"])
	{
	
		$smarty = p_get_smarty();
		
		$smarty->assign('g_show', $g_show);
		
		$smarty->display("foodv2/mblog/insert_food_status_by_mid.html");

		exit;
	
	}



}

try
{
//	admin_check_login();
// 	admin_check_user_priv("foodv2/main_nav.php");
	
	check_cgi_pro();
	get_data();
}
catch(Exception $e)
{
	$g_show["error"] = 1;
	$g_show["errmsg"] = $e->getMessage();
}

show_pro();
exit;

